import request from "@/utils/request";

enum Api {
  getMVUrl = "/mv/url",
  getMVInfoUrl = "/mv/detail",
  getRelatedMVUrl = "/related/allvideo",
}

/**
 * @description:获取MV详情
 * @param {number} mvid
 * @return {*}
 */
export const getMVInfoApi = (mvid: number) => {
  return request.get<any, any>(Api.getMVInfoUrl, {
    params: {
      mvid,
    },
  });
};

/**
 * @description:获取MV播放URL
 * @param {number} id
 * @return {*}
 */
export const getMVApi = (id: number) => {
  return request.get<any, any>(Api.getMVUrl, {
    params: {
      id,
    },
  });
};

/**
 * @description:获取MV相关推荐视频
 * @param {number} id
 * @return {*}
 */
export const getRelatedMVApi = (id: number) => {
  return request.get<any, any>(Api.getRelatedMVUrl, {
    params: { id },
  });
};
